package com.test.blogsystem.Utils;


import com.test.blogsystem.Pojo.DO.BlogInfo;
import com.test.blogsystem.Pojo.Response.BlogInfoResponse;
import jakarta.annotation.Nonnull;
import org.springframework.beans.BeanUtils;

public class MyBeanUtil {
    public static BlogInfoResponse transBlogInfo(BlogInfo blogInfo) {
        BlogInfoResponse blogInfoResponse = new BlogInfoResponse();
        if(blogInfo==null) return blogInfoResponse;

        BeanUtils.copyProperties(blogInfo, blogInfoResponse);
        return blogInfoResponse;
    }
}
